Skip to content

Conversation

@fuguiKz
Copy link

@fuguiKz fuguiKz commented Dec 19, 2025

Resolves getsentry/sentry-dotnet#4777

Adds a basic Web.config appSettings snippet and updates the ASP.NET guide example to read the DSN from ConfigurationManager.AppSettings["SentryDsn"].

Urgency: not urgent.

@vercel
Copy link

vercel bot commented Dec 19, 2025

@fuguiKz is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

_sentry = SentrySdk.Init(options =>
{
options.Dsn = "___PUBLIC_DSN___";
options.Dsn = ConfigurationManager.AppSettings["SentryDsn"];

This comment was marked as outdated.

@bitsandfoxes bitsandfoxes requested review from Flash0ver and removed request for bitsandfoxes January 7, 2026 14:33
Copy link
Member

@Flash0ver Flash0ver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fuguiKz thank you very much for the PR!
Sorry I didn't notice it earlier (thanks @bitsandfoxes for the ping).

Comment on lines +36 to +45
If you'd prefer not to hardcode your DSN in your source code, you can store it in your `Web.config` file:

```xml {filename:Web.config}
<configuration>
<appSettings>
<add key="SentryDsn" value="___PUBLIC_DSN___" />
</appSettings>
</configuration>
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: add short web.config example, without replacing the existing quick-start guide

I do like the example!
But I would prefer if we list the web.config example as an additional alternative to the "default" hardcoded variant.

E.g. before the section ### Capturing the affected user

  • add a new sub-section
    • e.g. ### Configure via `web.config` file
  • insert this text and code snipped in the new sub-section
  • insert a short C# snippet consuming the web.config:
SentrySdk.Init(options =>
{
  options.Dsn = ConfigurationManager.AppSettings["SentryDsn"];
});

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
develop-docs Ready Ready Preview, Comment Jan 12, 2026 0:13am
sentry-docs Ready Ready Preview, Comment Jan 12, 2026 0:13am

@fuguiKz
Copy link
Author

fuguiKz commented Jan 7, 2026

Thanks for the quick review!

It looks like the required Vercel preview is still waiting for team authorization (see the vercel[bot] comment). Could someone from the Sentry team authorize the deployment so the checks can proceed?

Happy to adjust anything if you’d like changes.

@Flash0ver
Copy link
Member

It looks like the required Vercel preview is still waiting for team authorization (see the vercel[bot] comment). Could someone from the Sentry team authorize the deployment so the checks can proceed?

@fuguiKz sorry ... made a mistake last time for the approval ... now it's deployed

Happy to adjust anything if you’d like changes.

I commented on the PR ... what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Web.config example to ASP.NET Quick Start guide

2 participants